import java.util.Random;
import java.util.Scanner;

public class guessnum {
    public static void main(String[] args) {
        Random random = new Random();
        int num = random.nextInt(100);
        Scanner scan = new Scanner(System.in);
        System.out.println("猜一下数字是多少：");
        while(true){
            int a = scan.nextInt();
            if(a<num){
                System.out.println("猜小了！");
            }
            else if(a>num){
                System.out.println("猜大了！");
            }
            else{
                System.out.println("猜对了！");
                break;
            }
        }
    }
}
